using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Numerics;
using ns18;
using ns20;

namespace Newtonsoft.Json
{
	public class JsonTextReader : JsonReader, IJsonLineInfo
	{
		private const char char_1 = '\ufffd';

		private readonly TextReader textReader_0;

		private char[] char_2;

		private int int_0;

		private int int_1;

		private int int_2;

		private int int_3;

		private bool bool_2;

		private Class191 class191_0;

		private Struct29 struct29_0;

		public int LineNumber
		{
			get
			{
				if (base.CurrentState == State.Start && LinePosition == 0)
				{
					return 0;
				}
				return int_3;
			}
		}

		public int LinePosition => int_1 - int_2;

		public JsonTextReader(TextReader reader)
		{
			if (reader == null)
			{
				throw new ArgumentNullException("reader");
			}
			textReader_0 = reader;
			int_3 = 1;
			char_2 = new char[1025];
		}

		private Class191 method_14()
		{
			if (class191_0 == null)
			{
				class191_0 = new Class191(1025);
			}
			else
			{
				class191_0.Int32_0 = 0;
			}
			return class191_0;
		}

		private void method_15(int int_4)
		{
			int_3++;
			int_2 = int_4 - 1;
		}

		private void method_16(char char_3)
		{
			int_1++;
			method_17();
			method_22(char_3);
			if (enum14_0 == Enum14.ReadAsBytes)
			{
				byte[] value = ((struct29_0.Int32_1 != 0) ? Convert.FromBase64CharArray(struct29_0.Char_0, struct29_0.Int32_0, struct29_0.Int32_1) : new byte[0]);
				SetToken(JsonToken.Bytes, value);
				return;
			}
			if (enum14_0 == Enum14.ReadAsString)
			{
				string value2 = struct29_0.ToString();
				SetToken(JsonToken.String, value2);
				char_0 = char_3;
				return;
			}
			string text = struct29_0.ToString();
			if (dateParseHandling_0 != 0)
			{
				DateParseHandling dateParseHandling = ((enum14_0 == Enum14.ReadAsDateTime) ? DateParseHandling.DateTime : ((enum14_0 != Enum14.ReadAsDateTimeOffset) ? dateParseHandling_0 : DateParseHandling.DateTimeOffset));
				if (Class185.smethod_13(text, dateParseHandling, base.DateTimeZoneHandling, out var value3))
				{
					SetToken(JsonToken.Date, value3);
					return;
				}
			}
			SetToken(JsonToken.String, text);
			char_0 = char_3;
		}

		private static void smethod_2(char[] char_3, int int_4, char[] char_4, int int_5, int int_6)
		{
			Buffer.BlockCopy(char_3, int_4 * 2, char_4, int_5 * 2, int_6 * 2);
		}

		private void method_17()
		{
			int num = char_2.Length;
			if ((double)(num - int_1) <= (double)num * 0.1)
			{
				int num2 = int_0 - int_1;
				if (num2 > 0)
				{
					smethod_2(char_2, int_1, char_2, 0, num2);
				}
				int_2 -= int_1;
				int_1 = 0;
				int_0 = num2;
				char_2[int_0] = '\0';
			}
		}

		private int method_18(bool bool_3)
		{
			return method_19(bool_3, 0);
		}

		private int method_19(bool bool_3, int int_4)
		{
			if (bool_2)
			{
				return 0;
			}
			if (int_0 + int_4 >= this.char_2.Length - 1)
			{
				if (bool_3)
				{
					int num = Math.Max(this.char_2.Length * 2, int_0 + int_4 + 1);
					char[] char_ = new char[num];
					smethod_2(this.char_2, 0, char_, 0, this.char_2.Length);
					this.char_2 = char_;
				}
				else
				{
					int num2 = int_0 - int_1;
					if (num2 + int_4 + 1 >= this.char_2.Length)
					{
						char[] char_2 = new char[num2 + int_4 + 1];
						if (num2 > 0)
						{
							smethod_2(this.char_2, int_1, char_2, 0, num2);
						}
						this.char_2 = char_2;
					}
					else if (num2 > 0)
					{
						smethod_2(this.char_2, int_1, this.char_2, 0, num2);
					}
					int_2 -= int_1;
					int_1 = 0;
					int_0 = num2;
				}
			}
			int count = this.char_2.Length - int_0 - 1;
			int num3 = textReader_0.Read(this.char_2, int_0, count);
			int_0 += num3;
			if (num3 == 0)
			{
				bool_2 = true;
			}
			this.char_2[int_0] = '\0';
			return num3;
		}

		private bool method_20(int int_4, bool bool_3)
		{
			if (int_1 + int_4 >= int_0)
			{
				return method_21(int_4, bool_3);
			}
			return true;
		}

		private bool method_21(int int_4, bool bool_3)
		{
			if (bool_2)
			{
				return false;
			}
			int num = int_1 + int_4 - int_0 + 1;
			int num2 = 0;
			do
			{
				int num3 = method_19(bool_3, num - num2);
				if (num3 == 0)
				{
					break;
				}
				num2 += num3;
			}
			while (num2 < num);
			if (num2 < num)
			{
				return false;
			}
			return true;
		}

		[DebuggerStepThrough]
		public override bool Read()
		{
			enum14_0 = Enum14.Read;
			if (!Newtonsoft_002EJson_002EJsonReader_002E_202E_206F_206A_206A_202D_202B_206A_202E_206F_206F_200B_200B_200F_206D_200F_206F_200C_200E_202A_202E_202A_206C_202B_200C_202A_206E_200C_202C_200D_200E_202D_200C_206D_200F_202B_206A_206B_200D_206C_202D_202E())
			{
				SetToken(JsonToken.None);
				return false;
			}
			return true;
		}

		public override byte[] ReadAsBytes()
		{
			return method_5();
		}

		public override decimal? ReadAsDecimal()
		{
			return method_6();
		}

		public override int? ReadAsInt32()
		{
			return method_7();
		}

		public override string ReadAsString()
		{
			return method_8();
		}

		public override DateTime? ReadAsDateTime()
		{
			return method_9();
		}

		public override DateTimeOffset? ReadAsDateTimeOffset()
		{
			return method_4();
		}

		internal override bool Newtonsoft_002EJson_002EJsonReader_002E_202E_206F_206A_206A_202D_202B_206A_202E_206F_206F_200B_200B_200F_206D_200F_206F_200C_200E_202A_202E_202A_206C_202B_200C_202A_206E_200C_202C_200D_200E_202D_200C_206D_200F_202B_206A_206B_200D_206C_202D_202E()
		{
			do
			{
				IL_0000:
				switch (state_0)
				{
				case State.Complete:
				case State.Closed:
				case State.Error:
					break;
				case State.PostValue:
					continue;
				default:
					throw JsonReaderException.smethod_1(this, "Unexpected state: {0}.".smethod_0(CultureInfo.InvariantCulture, base.CurrentState));
				case State.ObjectStart:
				case State.Object:
					return method_28();
				case State.Start:
				case State.Property:
				case State.ArrayStart:
				case State.Array:
				case State.ConstructorStart:
				case State.Constructor:
					return method_32();
				case State.Finished:
					if (method_20(0, bool_3: false))
					{
						method_35(bool_3: false);
						if (bool_2)
						{
							return false;
						}
						if (char_2[int_1] == '/')
						{
							method_38();
							return true;
						}
						throw JsonReaderException.smethod_1(this, "Additional text encountered after finished reading JSON content: {0}.".smethod_0(CultureInfo.InvariantCulture, char_2[int_1]));
					}
					return false;
				}
				goto IL_0000;
			}
			while (!method_27());
			return true;
		}

		private void method_22(char char_3)
		{
			int num = int_1;
			int num2 = int_1;
			int num3 = int_1;
			Class191 @class = null;
			while (true)
			{
				switch (char_2[num++])
				{
				case '\\':
					int_1 = num;
					if (method_20(0, bool_3: true))
					{
						int int_ = num - 1;
						char c = char_2[num];
						char c2;
						switch (c)
						{
						case '\\':
							num++;
							c2 = '\\';
							goto IL_0211;
						case '"':
						case '\'':
						case '/':
							c2 = c;
							num++;
							goto IL_0211;
						case 'f':
							num++;
							c2 = '\f';
							goto IL_0211;
						case 'b':
							num++;
							c2 = '\b';
							goto IL_0211;
						case 'r':
							num++;
							c2 = '\r';
							goto IL_0211;
						case 't':
							num++;
							c2 = '\t';
							goto IL_0211;
						case 'u':
							num = (int_1 = num + 1);
							c2 = method_24();
							if (Class199.smethod_12(c2))
							{
								c2 = '\ufffd';
							}
							else if (Class199.smethod_11(c2))
							{
								bool flag;
								do
								{
									flag = false;
									if (!method_20(2, bool_3: true) || char_2[int_1] != '\\' || char_2[int_1 + 1] != 'u')
									{
										c2 = '\ufffd';
										continue;
									}
									char char_4 = c2;
									int_1 += 2;
									c2 = method_24();
									if (!Class199.smethod_12(c2))
									{
										if (Class199.smethod_11(c2))
										{
											char_4 = '\ufffd';
											flag = true;
										}
										else
										{
											char_4 = '\ufffd';
										}
									}
									if (@class == null)
									{
										@class = method_14();
									}
									method_23(@class, char_4, num3, int_);
									num3 = int_1;
								}
								while (flag);
							}
							num = int_1;
							goto IL_0211;
						case 'n':
							num++;
							c2 = '\n';
							goto IL_0211;
						default:
							{
								num = (int_1 = num + 1);
								throw JsonReaderException.smethod_1(this, "Bad JSON escape sequence: {0}.".smethod_0(CultureInfo.InvariantCulture, "\\" + c));
							}
							IL_0211:
							if (@class == null)
							{
								@class = method_14();
							}
							method_23(@class, c2, num3, int_);
							num3 = num;
							break;
						}
						break;
					}
					int_1 = num;
					throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3));
				case '"':
				case '\'':
					if (char_2[num - 1] != char_3)
					{
						break;
					}
					num--;
					if (num2 == num3)
					{
						struct29_0 = new Struct29(char_2, num2, num - num2);
					}
					else
					{
						if (@class == null)
						{
							@class = method_14();
						}
						if (num > num3)
						{
							@class.method_1(char_2, num3, num - num3);
						}
						struct29_0 = new Struct29(@class.method_5(), 0, @class.Int32_0);
					}
					num = (int_1 = num + 1);
					return;
				case '\r':
					int_1 = num - 1;
					method_34(bool_3: true);
					num = int_1;
					break;
				case '\n':
					int_1 = num - 1;
					method_33();
					num = int_1;
					break;
				case '\0':
					if (int_0 == num - 1)
					{
						num--;
						if (method_18(bool_3: true) == 0)
						{
							int_1 = num;
							throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3));
						}
					}
					break;
				}
			}
		}

		private void method_23(Class191 class191_1, char char_3, int int_4, int int_5)
		{
			if (int_5 > int_4)
			{
				class191_1.method_1(char_2, int_4, int_5 - int_4);
			}
			class191_1.method_0(char_3);
		}

		private char method_24()
		{
			if (!method_20(4, bool_3: true))
			{
				throw JsonReaderException.smethod_1(this, "Unexpected end while parsing unicode character.");
			}
			string s = new string(char_2, int_1, 4);
			char c = Convert.ToChar(int.Parse(s, NumberStyles.HexNumber, NumberFormatInfo.InvariantInfo));
			char result = c;
			int_1 += 4;
			return result;
		}

		private void method_25()
		{
			int num = int_1;
			do
			{
				IL_00e0:
				switch (char_2[num++])
				{
				case '\0':
					if (int_0 != num - 1)
					{
						int_1 = num - 1;
						return;
					}
					goto IL_00cc;
				case '+':
				case '-':
				case '.':
				case '0':
				case '1':
				case '2':
				case '3':
				case '4':
				case '5':
				case '6':
				case '7':
				case '8':
				case '9':
				case 'A':
				case 'B':
				case 'C':
				case 'D':
				case 'E':
				case 'F':
				case 'X':
				case 'a':
				case 'b':
				case 'c':
				case 'd':
				case 'e':
				case 'f':
				case 'x':
					break;
				default:
					int_1 = num - 1;
					return;
				}
				goto IL_00e0;
				IL_00cc:
				num = (int_1 = num - 1);
			}
			while (method_18(bool_3: true) != 0);
		}

		private void method_26()
		{
			if (class191_0 != null)
			{
				class191_0.Int32_0 = 0;
			}
			struct29_0 = default(Struct29);
		}

		private bool method_27()
		{
			while (true)
			{
				char c = char_2[int_1];
				switch (c)
				{
				case '\n':
					method_33();
					break;
				case '\r':
					method_34(bool_3: false);
					break;
				case '\0':
					if (int_0 == int_1)
					{
						if (method_18(bool_3: false) == 0)
						{
							state_0 = State.Finished;
							return false;
						}
					}
					else
					{
						int_1++;
					}
					break;
				default:
					if (char.IsWhiteSpace(c))
					{
						int_1++;
						break;
					}
					throw JsonReaderException.smethod_1(this, "After parsing a value an unexpected character was encountered: {0}.".smethod_0(CultureInfo.InvariantCulture, c));
				case '\t':
				case ' ':
					int_1++;
					break;
				case '/':
					method_38();
					return true;
				case ',':
					int_1++;
					SetStateBasedOnCurrent();
					return false;
				case '}':
					int_1++;
					SetToken(JsonToken.EndObject);
					return true;
				case ']':
					int_1++;
					SetToken(JsonToken.EndArray);
					return true;
				case ')':
					int_1++;
					SetToken(JsonToken.EndConstructor);
					return true;
				}
			}
		}

		private bool method_28()
		{
			while (true)
			{
				char c = char_2[int_1];
				switch (c)
				{
				case '\t':
				case ' ':
					int_1++;
					break;
				case '\n':
					method_33();
					break;
				default:
					if (char.IsWhiteSpace(c))
					{
						int_1++;
						break;
					}
					return method_29();
				case '\r':
					method_34(bool_3: false);
					break;
				case '\0':
					if (int_0 == int_1)
					{
						if (method_18(bool_3: false) == 0)
						{
							return false;
						}
					}
					else
					{
						int_1++;
					}
					break;
				case '}':
					SetToken(JsonToken.EndObject);
					int_1++;
					return true;
				case '/':
					method_38();
					return true;
				}
			}
		}

		private bool method_29()
		{
			char c = char_2[int_1];
			char char_;
			if (c != '"' && c != '\'')
			{
				if (!method_30(c))
				{
					throw JsonReaderException.smethod_1(this, "Invalid property identifier character: {0}.".smethod_0(CultureInfo.InvariantCulture, char_2[int_1]));
				}
				char_ = '\0';
				method_17();
				method_31();
			}
			else
			{
				int_1++;
				char_ = c;
				method_17();
				method_22(char_);
			}
			string value = struct29_0.ToString();
			method_35(bool_3: false);
			if (char_2[int_1] != ':')
			{
				throw JsonReaderException.smethod_1(this, "Invalid character after parsing property name. Expected ':' but got: {0}.".smethod_0(CultureInfo.InvariantCulture, char_2[int_1]));
			}
			int_1++;
			SetToken(JsonToken.PropertyName, value);
			char_0 = char_;
			method_26();
			return true;
		}

		private bool method_30(char char_3)
		{
			if (!char.IsLetterOrDigit(char_3) && char_3 != '_')
			{
				return char_3 == '$';
			}
			return true;
		}

		private void method_31()
		{
			int num = int_1;
			char c;
			while (true)
			{
				if (char_2[int_1] != 0)
				{
					c = char_2[int_1];
					if (!method_30(c))
					{
						break;
					}
					int_1++;
					continue;
				}
				if (int_0 == int_1)
				{
					if (method_18(bool_3: true) == 0)
					{
						throw JsonReaderException.smethod_1(this, "Unexpected end while parsing unquoted property name.");
					}
					continue;
				}
				struct29_0 = new Struct29(char_2, num, int_1 - num);
				return;
			}
			if (!char.IsWhiteSpace(c) && c != ':')
			{
				throw JsonReaderException.smethod_1(this, "Invalid JavaScript property identifier character: {0}.".smethod_0(CultureInfo.InvariantCulture, c));
			}
			struct29_0 = new Struct29(char_2, num, int_1 - num);
		}

		private bool method_32()
		{
			while (true)
			{
				char c = char_2[int_1];
				switch (c)
				{
				case '\n':
					method_33();
					break;
				case '\r':
					method_34(bool_3: false);
					break;
				case '\0':
					if (int_0 == int_1)
					{
						if (method_18(bool_3: false) == 0)
						{
							return false;
						}
					}
					else
					{
						int_1++;
					}
					break;
				case '\t':
				case ' ':
					int_1++;
					break;
				default:
					if (char.IsWhiteSpace(c))
					{
						int_1++;
						break;
					}
					if (!char.IsNumber(c) && c != '-' && c != '.')
					{
						throw JsonReaderException.smethod_1(this, "Unexpected character encountered while parsing value: {0}.".smethod_0(CultureInfo.InvariantCulture, c));
					}
					method_37();
					return true;
				case 'f':
					method_45();
					return true;
				case '[':
					int_1++;
					SetToken(JsonToken.StartArray);
					return true;
				case ']':
					int_1++;
					SetToken(JsonToken.EndArray);
					return true;
				case 'N':
					method_48();
					return true;
				case '{':
					int_1++;
					SetToken(JsonToken.StartObject);
					return true;
				case 't':
					method_42();
					return true;
				case 'u':
					method_44();
					return true;
				case 'n':
					if (method_20(1, bool_3: true))
					{
						char c2 = char_2[int_1 + 1];
						if (c2 == 'u')
						{
							method_43();
						}
						else
						{
							if (c2 != 'e')
							{
								throw JsonReaderException.smethod_1(this, "Unexpected character encountered while parsing value: {0}.".smethod_0(CultureInfo.InvariantCulture, char_2[int_1]));
							}
							method_36();
						}
						return true;
					}
					throw JsonReaderException.smethod_1(this, "Unexpected end.");
				case 'I':
					method_47();
					return true;
				case ')':
					int_1++;
					SetToken(JsonToken.EndConstructor);
					return true;
				case ',':
					SetToken(JsonToken.Undefined);
					return true;
				case '-':
					if (method_20(1, bool_3: true) && char_2[int_1 + 1] == 'I')
					{
						method_46();
					}
					else
					{
						method_37();
					}
					return true;
				case '/':
					method_38();
					return true;
				case '"':
				case '\'':
					method_16(c);
					return true;
				}
			}
		}

		private void method_33()
		{
			int_1++;
			method_15(int_1);
		}

		private void method_34(bool bool_3)
		{
			int_1++;
			if (method_20(1, bool_3) && char_2[int_1] == '\n')
			{
				int_1++;
			}
			method_15(int_1);
		}

		private bool method_35(bool bool_3)
		{
			bool flag = false;
			bool result = false;
			while (!flag)
			{
				char c = char_2[int_1];
				switch (c)
				{
				case '\r':
					method_34(bool_3: false);
					continue;
				case '\n':
					method_33();
					continue;
				case '\0':
					if (int_0 == int_1)
					{
						if (method_18(bool_3: false) == 0)
						{
							flag = true;
						}
					}
					else
					{
						int_1++;
					}
					continue;
				}
				if (c != ' ' && !char.IsWhiteSpace(c))
				{
					flag = true;
					continue;
				}
				result = true;
				int_1++;
			}
			if (bool_3)
			{
				return result;
			}
			return true;
		}

		private void method_36()
		{
			if (method_40("new"))
			{
				method_35(bool_3: false);
				int num = int_1;
				int num2;
				while (true)
				{
					char c = char_2[int_1];
					if (c != 0)
					{
						if (!char.IsLetterOrDigit(c))
						{
							switch (c)
							{
							case '\r':
								num2 = int_1;
								method_34(bool_3: true);
								break;
							case '\n':
								num2 = int_1;
								method_33();
								break;
							default:
								if (char.IsWhiteSpace(c))
								{
									num2 = int_1;
									int_1++;
									break;
								}
								if (c == '(')
								{
									num2 = int_1;
									break;
								}
								throw JsonReaderException.smethod_1(this, "Unexpected character while parsing constructor: {0}.".smethod_0(CultureInfo.InvariantCulture, c));
							}
							break;
						}
						int_1++;
					}
					else
					{
						if (int_0 != int_1)
						{
							num2 = int_1;
							int_1++;
							break;
						}
						if (method_18(bool_3: true) == 0)
						{
							throw JsonReaderException.smethod_1(this, "Unexpected end while parsing constructor.");
						}
					}
				}
				struct29_0 = new Struct29(char_2, num, num2 - num);
				string value = struct29_0.ToString();
				method_35(bool_3: false);
				if (char_2[int_1] != '(')
				{
					throw JsonReaderException.smethod_1(this, "Unexpected character while parsing constructor: {0}.".smethod_0(CultureInfo.InvariantCulture, char_2[int_1]));
				}
				int_1++;
				method_26();
				SetToken(JsonToken.StartConstructor, value);
				return;
			}
			throw JsonReaderException.smethod_1(this, "Unexpected content while parsing JSON.");
		}

		private void method_37()
		{
			method_17();
			char c = char_2[int_1];
			int num = int_1;
			method_25();
			struct29_0 = new Struct29(char_2, num, int_1 - num);
			bool flag = char.IsDigit(c) && struct29_0.Int32_1 == 1;
			bool flag2 = c == '0' && struct29_0.Int32_1 > 1 && struct29_0.Char_0[struct29_0.Int32_0 + 1] != '.' && struct29_0.Char_0[struct29_0.Int32_0 + 1] != 'e' && struct29_0.Char_0[struct29_0.Int32_0 + 1] != 'E';
			object value;
			JsonToken newToken;
			if (enum14_0 == Enum14.ReadAsInt32)
			{
				if (flag)
				{
					value = c - 48;
				}
				else if (flag2)
				{
					string text = struct29_0.ToString();
					int num2 = (text.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt32(text, 16) : Convert.ToInt32(text, 8));
					value = num2;
				}
				else
				{
					value = Class182.smethod_15(struct29_0.Char_0, struct29_0.Int32_0, struct29_0.Int32_1);
				}
				newToken = JsonToken.Integer;
			}
			else if (enum14_0 == Enum14.ReadAsDecimal)
			{
				if (flag)
				{
					value = (decimal)c - 48m;
				}
				else if (flag2)
				{
					string text2 = struct29_0.ToString();
					long value2 = (text2.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt64(text2, 16) : Convert.ToInt64(text2, 8));
					value = Convert.ToDecimal(value2);
				}
				else
				{
					string s = struct29_0.ToString();
					value = decimal.Parse(s, NumberStyles.Number | NumberStyles.AllowExponent, CultureInfo.InvariantCulture);
				}
				newToken = JsonToken.Float;
			}
			else if (flag)
			{
				value = c - 48L;
				newToken = JsonToken.Integer;
			}
			else if (flag2)
			{
				string text3 = struct29_0.ToString();
				value = (text3.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt64(text3, 16) : Convert.ToInt64(text3, 8));
				newToken = JsonToken.Integer;
			}
			else
			{
				long long_;
				switch (Class182.smethod_16(struct29_0.Char_0, struct29_0.Int32_0, struct29_0.Int32_1, out long_))
				{
				case Enum18.Success:
					value = long_;
					newToken = JsonToken.Integer;
					break;
				case Enum18.Invalid:
				{
					string text4 = struct29_0.ToString();
					value = ((floatParseHandling_0 != FloatParseHandling.Decimal) ? ((object)Convert.ToDouble(text4, CultureInfo.InvariantCulture)) : ((object)decimal.Parse(text4, NumberStyles.Number | NumberStyles.AllowExponent, CultureInfo.InvariantCulture)));
					newToken = JsonToken.Float;
					break;
				}
				case Enum18.Overflow:
				{
					string value3 = struct29_0.ToString();
					value = BigInteger.Parse(value3, CultureInfo.InvariantCulture);
					newToken = JsonToken.Integer;
					break;
				}
				default:
					throw JsonReaderException.smethod_1(this, "Unknown error parsing integer.");
				}
			}
			method_26();
			SetToken(newToken, value);
		}

		private void method_38()
		{
			int_1++;
			if (method_20(1, bool_3: false) && char_2[int_1] == '*')
			{
				int_1++;
				int num = int_1;
				bool flag = false;
				while (!flag)
				{
					switch (char_2[int_1])
					{
					case '\n':
						method_33();
						break;
					case '\0':
						if (int_0 == int_1)
						{
							if (method_18(bool_3: true) == 0)
							{
								throw JsonReaderException.smethod_1(this, "Unexpected end while parsing comment.");
							}
						}
						else
						{
							int_1++;
						}
						break;
					default:
						int_1++;
						break;
					case '*':
						int_1++;
						if (method_20(0, bool_3: true) && char_2[int_1] == '/')
						{
							struct29_0 = new Struct29(char_2, num, int_1 - num - 1);
							int_1++;
							flag = true;
						}
						break;
					case '\r':
						method_34(bool_3: true);
						break;
					}
				}
				SetToken(JsonToken.Comment, struct29_0.ToString());
				method_26();
				return;
			}
			throw JsonReaderException.smethod_1(this, "Error parsing comment. Expected: *, got {0}.".smethod_0(CultureInfo.InvariantCulture, char_2[int_1]));
		}

		private bool method_39(string string_0)
		{
			if (!method_20(string_0.Length - 1, bool_3: true))
			{
				return false;
			}
			int num = 0;
			while (true)
			{
				if (num < string_0.Length)
				{
					if (char_2[int_1 + num] != string_0[num])
					{
						break;
					}
					num++;
					continue;
				}
				int_1 += string_0.Length;
				return true;
			}
			return false;
		}

		private bool method_40(string string_0)
		{
			if (!method_39(string_0))
			{
				return false;
			}
			if (!method_20(0, bool_3: false))
			{
				return true;
			}
			if (!method_41(char_2[int_1]))
			{
				return char_2[int_1] == '\0';
			}
			return true;
		}

		private bool method_41(char char_3)
		{
			switch (char_3)
			{
			case ')':
				if (base.CurrentState == State.Constructor || base.CurrentState == State.ConstructorStart)
				{
					return true;
				}
				goto IL_008f;
			case '\t':
			case '\n':
			case '\r':
			case ' ':
				return true;
			case '/':
				if (!method_20(1, bool_3: false))
				{
					return false;
				}
				return char_2[int_1 + 1] == '*';
			default:
				if (char.IsWhiteSpace(char_3))
				{
					return true;
				}
				goto IL_008f;
			case ',':
			case ']':
			case '}':
				{
					return true;
				}
				IL_008f:
				return false;
			}
		}

		private void method_42()
		{
			if (!method_40(JsonConvert.True))
			{
				throw JsonReaderException.smethod_1(this, "Error parsing boolean value.");
			}
			SetToken(JsonToken.Boolean, true);
		}

		private void method_43()
		{
			if (!method_40(JsonConvert.Null))
			{
				throw JsonReaderException.smethod_1(this, "Error parsing null value.");
			}
			SetToken(JsonToken.Null);
		}

		private void method_44()
		{
			if (!method_40(JsonConvert.Undefined))
			{
				throw JsonReaderException.smethod_1(this, "Error parsing undefined value.");
			}
			SetToken(JsonToken.Undefined);
		}

		private void method_45()
		{
			if (!method_40(JsonConvert.False))
			{
				throw JsonReaderException.smethod_1(this, "Error parsing boolean value.");
			}
			SetToken(JsonToken.Boolean, false);
		}

		private void method_46()
		{
			if (method_40(JsonConvert.NegativeInfinity))
			{
				if (floatParseHandling_0 == FloatParseHandling.Decimal)
				{
					throw new JsonReaderException("Cannot read -Infinity as a decimal.");
				}
				SetToken(JsonToken.Float, double.NegativeInfinity);
				return;
			}
			throw JsonReaderException.smethod_1(this, "Error parsing negative infinity value.");
		}

		private void method_47()
		{
			if (method_40(JsonConvert.PositiveInfinity))
			{
				if (floatParseHandling_0 == FloatParseHandling.Decimal)
				{
					throw new JsonReaderException("Cannot read Infinity as a decimal.");
				}
				SetToken(JsonToken.Float, double.PositiveInfinity);
				return;
			}
			throw JsonReaderException.smethod_1(this, "Error parsing positive infinity value.");
		}

		private void method_48()
		{
			if (method_40(JsonConvert.NaN))
			{
				if (floatParseHandling_0 == FloatParseHandling.Decimal)
				{
					throw new JsonReaderException("Cannot read NaN as a decimal.");
				}
				SetToken(JsonToken.Float, double.NaN);
				return;
			}
			throw JsonReaderException.smethod_1(this, "Error parsing NaN value.");
		}

		public override void Close()
		{
			base.Close();
			if (base.CloseInput && textReader_0 != null)
			{
				textReader_0.Close();
			}
			if (class191_0 != null)
			{
				class191_0.method_2();
			}
		}

		public bool HasLineInfo()
		{
			return true;
		}
	}
}
